# Contributor:
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgtop
pkgver=2.40.0
pkgrel=0
pkgdesc="GNOME top library"
url="https://www.gnome.org/"
arch="all"
license="LGPL-2.1-or-later"
options="!check" # No testsuite
makedepends="intltool linux-headers glib-dev libxau-dev libx11-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-tools"
source="https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-static=no
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	pkgdesc="$pkgdesc (utilities)"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/bin
}

sha512sums="a9b2135796d7e41c63a6621f672c385d1baeb74d4af3e55c9164aaaae18c66a8a76b09a6ae8b37f89f120092123c38830e0da840c6613a09035ea62339117861  libgtop-2.40.0.tar.xz"
